//
//  ChatSectionModel.swift
//  AESOLAR_IOS
//
//  Created by Mr.Wang on 2019/10/16.
//  Copyright © 2019 Mr.Wang. All rights reserved.
//

import RxDataSources

enum ChatItemModel {
    case myChat(ChatLayoutModel)
    case myImage(ChatLayoutModel)
    case otherChat(ChatLayoutModel)
    case otherImage(ChatLayoutModel)
}

extension ChatItemModel {
    
    var chatlayotModel: ChatLayoutModel {
        switch self {
        case .myChat(let model):
            return model
        case .myImage(let model):
            return model
        case .otherChat(let model):
            return model
        case .otherImage(let model):
            return model
        }
    }
    
}

struct ChatSectionModel {

    var item: ChatItemModel
    var time: String = ""
    
    init(item: ChatItemModel, time: String) {
        self.item = item
        self.time = time
    }

}
